home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 103 < prev    next >
Internet Message Format  |  1996-08-06  |  1KB

  1. Path: lyra.csx.cam.ac.uk!nmm1
  2. From: nmm1@cus.cam.ac.uk (Nick Maclaren)
  3. Newsgroups: comp.std.c
  4. Subject: Re: Meaning of __STDC__?
  5. Date: 14 Jan 1996 12:27:09 GMT
  6. Organization: University of Cambridge, England
  7. Message-ID: <4dasqt$k7c@lyra.csx.cam.ac.uk>
  8. References: <4d6673$8to@mailgate.bridgewater.ne.hcc.com> <DL545u.MBy%spenford@zoo.toronto.edu>
  9. NNTP-Posting-Host: bootes.cus.cam.ac.uk
  10.  
  11. In article <DL545u.MBy%spenford@zoo.toronto.edu>,
  12. Henry Spencer  <henry@zoo.toronto.edu> wrote:
  13. >
  14. >Actually, the standard says that __STDC__ is 1 in ANSI C.  It (necessarily)
  15. >says nothing about what __STDC__ might or might not be in non-standard C.
  16. >So technically you can't draw any conclusions at all from the presence of
  17. >__STDC__; the valid conclusion is `standard -> __STDC__', not vice-versa.
  18. >Of course, one would hope that most implementors have the sense to define
  19. >__STDC__ only when the standard is satisfied, but counterexamples do exist.
  20.  
  21. Yes, indeed, and it is usually worth watching out for __STDC__ being
  22. set to 0.  This commonly means "this compiler accepts a language that
  23. looks very like standard C, but has subtle and confusing differences."
  24.  
  25. I have never seen __STDC__ in any other states than unset, set to 0
  26. and set to 1, but wouldn't rule it out.
  27.  
  28.  
  29. Nick Maclaren,
  30. University of Cambridge Computer Laboratory,
  31. New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
  32. Email:  nmm1@cam.ac.uk
  33. Tel.:  +44 1223 334761    Fax:  +44 1223 334679
  34.